<?php

namespace Database\Seeders;

use App\Models\Admin;
use Illuminate\Database\Seeder;

class AdminTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        // 后台管理员
        Admin::query()->truncate();

        Admin::query()->create([
            'name' => 'admin',
            'phone' => '13800000000',
            'password' => bcrypt('test123456'),
            'avatar' => '/static/images/avatar/avatar_1.jpg',
            'gender' => 1,
            'status' => 1,
            'is_super' => 1,
            'role' => 'admin',
        ]);

        Admin::query()->create([
            'name' => 'user',
            'phone' => '13800000001',
            'password' => bcrypt('test123456'),
            'avatar' => '/static/images/avatar/avatar_2.jpg',
            'gender' => 1,
            'status' => 1,
            'is_super' => 0,
            'role' => 'user',
        ]);
    }
}
